﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BuildPlannerLib.SimEvents
{
    // Abstract class for events
    public abstract class SimEvent : IComparable<SimEvent>
    {
        // Build field for referencing
        public Build Build;

        // Integer property that defines when the event will take place
        private int time;
        public int Time
        {
            get { return time; }
            set { time = value; }
        }

        // Public method that makes Sort() sort the event list by Time
        public int CompareTo(SimEvent e)
        {
            return this.Time.CompareTo(e.Time);
        }

        // Abstract method for executing the event
        public abstract void Execute();

        // Virtual method for getting the AtBase field of an Event within the list.
        public virtual Base GetBase()
        {
            return null;
        }
    }
}
